home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume12 / psf2 / part02 < prev    next >
Encoding:
Text File  |  1990-05-19  |  41.6 KB  |  1,712 lines

  1. Newsgroups: comp.sources.misc
  2. From: tony@ajfcal.UUCP (Tony Field)
  3. subject: v12i105: psf2.0 source 2/6
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 12, Issue 105
  7. Submitted-by: tony@ajfcal.UUCP (Tony Field)
  8. Archive-name: psf2/part02
  9.  
  10. psf2.0 source 2/6
  11. =================
  12. #! /bin/sh
  13. # This is a shell archive.  Remove anything before this line, then unpack
  14. # it by saving it into a file and typing "sh file".  To overwrite existing
  15. # files, type "sh file -c".  You can also feed this as standard input via
  16. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  17. # will see the following message at the end:
  18. #        "End of archive 2 (of 6)."
  19. # Contents:  Makefile Roadmap defs/dp_us470.def defs/ibm20470.def pmf.1
  20. #   pmf.doc pnf.1 pnf.doc psd.1 psd.doc psfsample.LP psfunix.LP
  21. #   psfxenix.LP sample.def
  22. # Wrapped by ajf@trifid on Tue May 15 01:10:44 1990
  23. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  24. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  25.   echo shar: Will not clobber existing file \"'Makefile'\"
  26. else
  27. echo shar: Extracting \"'Makefile'\" \(2714 characters\)
  28. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  29. X#    Make the psf postscript filter system
  30. X#
  31. X#    usage:    make all    -> to compile all source
  32. X#
  33. X#        make def    -> make the .def files from .ppd
  34. X#
  35. X#
  36. X# - - - - Begin configuration - - - - -
  37. X#
  38. X.c.o:
  39. X    cc $(CFLAGS) $*.c $(LDFLAGS)
  40. X
  41. X# Location of binaries
  42. X# ^^^^^^^^^^^^^^^^^^^^
  43. X
  44. XBINDIR=/usr/local/bin
  45. XMANDIR=/usr/man/man.1
  46. X
  47. X# Location of printer definition file
  48. X# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  49. X#    Modify the DEFDIR in Install.xenix or Install.unix files to match this
  50. X#    Use another directory (/usr/local/lib ??) if psf is not being used
  51. X#    as part of the lp spooler system.
  52. X
  53. XDEFDIR=/usr/spool/lp/model/psfprint.def
  54. X
  55. X# Underline parametrics within FontInfo is not absolutely guaranteed.
  56. X# If you have implemented non-standard fonts without underline information
  57. X# in FontInfo, the provide the -DFONTINFO manifest.
  58. X
  59. X# Provide -DHOPPER if your printer has 2 paper hoppers
  60. X# that you will allow to be used for double sided printing.  (see psd.1)
  61. X
  62. X# e.g.: CFLAGS = -O  -DFONTINFO -DHOPPER -DBINDIR="$(BINDIR)" -DPDEF="\"$(DEFDIR)\""
  63. X
  64. X
  65. XCFLAGS = -O -DHOPPER -DBINDIR="\"$(BINDIR)\"" -DPDEF="\"$(DEFDIR)\"" 
  66. X
  67. XLDFLAGS = -lm
  68. X
  69. X
  70. X# Set CFLAGS for either '286 or '386 environments in xenix
  71. X
  72. X# CFLAGS = -Ml2t32 -F 4000 -DPDEF="\"$(DEFDIR)\"" -DBINDIR="\"$(BINDIR)\""
  73. X# CFLAGS = -O -DBINDIR="\"$(BINDIR)\"" -DPDEF="\"$(DEFDIR)\"" 
  74. X
  75. X# - - - - - end configuration - - - - - - - -
  76. X
  77. X
  78. XSOURCES  = psf.c pnf.c pmf.c psd.c psbanner.c psdetect.c selectdef.c table.c psf.h
  79. XOBJECTS  = psf.o pnf.o pmf.o psd.o psbanner.o psdetect.o
  80. XBINARIES = psf   pnf   pmf   psd   psbanner   psdetect
  81. XEXTRA     = selectdef table
  82. XMANS     = psf.1 pnf.1 pmf.1 psd.1 psmbox.1   psman.1   psnroff.1
  83. XDOCS     = psf.doc pnf.doc pmf.doc psd.doc psmbox.doc psman.doc psnroff.doc
  84. XSCRIPTS  = psmbox psman psmandouble psnroff
  85. XOTHERS     = Makefile README NOTICE Readme.Install Readme.Unix Readme.Xenix \
  86. X        Install.unix Install.xenix Testfile psfunix.LP psfxenix.LP \
  87. X        psfsample.LP Roadmap query sample.def patchlevel.h
  88. X
  89. X# Compile all sources
  90. X# ^^^^^^^
  91. Xall:    $(BINARIES) $(EXTRA)
  92. X
  93. Xpsf:    psf.c
  94. X    cc $(CFLAGS) psf.c -o psf $(LDFLAGS)
  95. X
  96. X# Binary installation only
  97. X# ^^^^^^^^^^^^^^^^^^^^^^^^
  98. Xinstall:
  99. X    cp $(BINARIES) $(BINDIR)
  100. X    cp psfprint.def $(DEFDIR)
  101. X
  102. X
  103. X# Create .def files from .ppd
  104. X# ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  105. X
  106. Xdef:
  107. X    table ./ppd/*.ppd defs
  108. X
  109. Xman:
  110. X    cp *.1 $(MANDIR)
  111. X    man psf > /dev/null
  112. X    man pnf > /dev/null
  113. X    man pmf > /dev/null
  114. X    man psd > /dev/null
  115. X    man psmbox > /dev/null
  116. X    man psman > /dev/null
  117. X    man psnroff > /dev/null
  118. X
  119. Xdoc:
  120. X    man -b psf > psf.doc
  121. X    man -b pnf > pnf.doc
  122. X    man -b pmf > pmf.doc
  123. X    man -b psd > psd.doc
  124. X    man -b psmbox > psmbox.doc
  125. X    man -b psman > psman.doc
  126. X    man -b psnroff > psnroff.doc
  127. X
  128. X
  129. Xtouch:
  130. X    touch $(SOURCES)
  131. X
  132. Xclean:
  133. X    rm -f $(BINARIES)
  134. X    rm -f *.o 
  135. X    rm -f *.B
  136. X    rm -f *.doc
  137. END_OF_FILE
  138. if test 2714 -ne `wc -c <'Makefile'`; then
  139.     echo shar: \"'Makefile'\" unpacked with wrong size!
  140. fi
  141. # end of 'Makefile'
  142. fi
  143. if test -f 'Roadmap' -a "${1}" != "-c" ; then 
  144.   echo shar: Will not clobber existing file \"'Roadmap'\"
  145. else
  146. echo shar: Extracting \"'Roadmap'\" \(2967 characters\)
  147. sed "s/^X//" >'Roadmap' <<'END_OF_FILE'
  148. XFile name       Usage
  149. X=============   ======================================================
  150. X
  151. X./defs/*    directory containing printer definitions
  152. X        The .def files are derived from the Adobe .ppd files
  153. X        by using programme "table" to translate the .ppd format
  154. X        into the .def format required by psf.
  155. X
  156. XReadme        General manual installation instructions.
  157. X
  158. XReadme.Unix    Installation instructions for Unix 3.2
  159. X
  160. XReadme.Xenix    Installation instructions for Xenix
  161. X
  162. XMakefile    Make all binaries and distribution files
  163. X
  164. XRoadmap        This document
  165. X
  166. XInstall.unix
  167. XInstall.xenix    install script for Xenix or Unix.  Amongst other things, 
  168. X        these scripts prepare the "model" file based on
  169. X        the prototype file "postscript.LP" file.  This file is
  170. X        copied into "model" directory after editing is done.
  171. X        
  172. X        In addition, the selected printer defintion file from
  173. X        the /defs/*.def directory is copied into appropriate
  174. X        directories.
  175. X
  176. X        Of course, all binaries and scripts must be copied to
  177. X        the users chosen directory.  If the user has installed
  178. X        the on-line man page system, he may also set up the
  179. X        psf man pages into a chosen directory.
  180. X    
  181. Xpatchlevel.h    current version indentification
  182. X
  183. Xpmf*        filter mailboxes (binary)
  184. Xpmf.1        man page for pmf
  185. Xpmf.c        source for mailbox filter
  186. X
  187. Xpnf*        filter nroff ouput to allow bold, underline, italic (binary)
  188. Xpnf.1        man page for pnf
  189. Xpnf.c        source for pnf filter
  190. X
  191. Xpostscript.EG    prototype psf printer model file for use with manual
  192. X        psf installation
  193. X        
  194. Xpostscript.LP    prototype psf printer model (for /usr/spool/lp/model)
  195. X        Install.xxx will edit this file with "sed" to put in
  196. X        the chosen BINARY directory and also the default
  197. X        psf printer OPTIONS.
  198. X
  199. Xpsbanner*    print job banner page (binary)
  200. Xpsbanner.c    source for psbanner
  201. X
  202. Xpsd*        print double sided pages (binary)
  203. Xpsd.1        man page for psd
  204. Xpsd.c        source for psd.
  205. X
  206. Xpsdetect*    detect if print file is already in postscript (binary)
  207. Xpsdetect.c    source for psdetect
  208. X
  209. Xpsf*        psf filter to wrap ascii file into postscript (binary)
  210. Xpsf.1        man page for psf
  211. Xpsf.c        source for psf
  212. Xpsf.h        include file (basic psf system parameters)
  213. X
  214. Xpsman*        print man pages with psf (bourne shell script)
  215. Xpsman.1        man page for psman
  216. Xpsmandouble    sample script to print double sided man pages (bourne shell)
  217. X
  218. Xpsmbox*        print user mailbox (bourne shell script)
  219. Xpsmbox.1    man page for psmbox
  220. X
  221. Xpsnroff*    filter nroff output for use with psf (bourne shell script)
  222. Xpsnroff.1    man page for psnroff
  223. X
  224. X*.doc        formatted versions of *.1 files for those systems
  225. X        without nroff and/or man pages
  226. X
  227. Xquery*        utility shell script used by installpsf
  228. X
  229. Xsample.def    "documentation" file to describe the .def file format
  230. X
  231. Xselectdef*    allow user to select printer type in installpsf (binary)
  232. Xselectdef.c    source for selectdef
  233. X
  234. Xtable*        generate .def printer definitions from Adobe .ppd's (binary)
  235. Xtable.c        source for table
  236. X
  237. XTestfile    print this with psf to show font facilities.
  238. X        (The file need editing with 'sed'.  See the Readme files
  239. X         for notes on how this must be done)
  240. X
  241. END_OF_FILE
  242. if test 2967 -ne `wc -c <'Roadmap'`; then
  243.     echo shar: \"'Roadmap'\" unpacked with wrong size!
  244. fi
  245. # end of 'Roadmap'
  246. fi
  247. if test -f 'defs/dp_us470.def' -a "${1}" != "-c" ; then 
  248.   echo shar: Will not clobber existing file \"'defs/dp_us470.def'\"
  249. else
  250. echo shar: Extracting \"'defs/dp_us470.def'\" \(2343 characters\)
  251. sed "s/^X//" >'defs/dp_us470.def' <<'END_OF_FILE'
  252. XDataproducts LZR 1260 v47.0
  253. XLetter
  254. Xstatusdict begin lettertray end
  255. X  612   792    15     8   597   784
  256. XLegal
  257. Xstatusdict begin legaltray end
  258. X  612  1008    15    15   597   993
  259. XStatement
  260. Xstatusdict begin statementtray end
  261. X  396   612    14     8   382   604
  262. XEnvelope.612.792
  263. Xstatusdict begin 3 setpapertray letterenvelope end
  264. X  612   792    15     8   597   784
  265. XEnvelope.612.1008
  266. Xstatusdict begin 3 setpapertray legalenvelope end
  267. X  612  1008    15    15   597   993
  268. XEnvelope.396.612
  269. Xstatusdict begin 3 setpapertray statementenvelope end
  270. X  396   612    14     8   382   604
  271. XEnvelope.595.842
  272. Xstatusdict begin 3 setpapertray a4envelope end
  273. X  595   842    14     8   581   834
  274. XEnvelope.420.595
  275. Xstatusdict begin 3 setpapertray a5envelope end
  276. X  420   595    15     8   405   588
  277. XEnvelope.516.729
  278. Xstatusdict begin 3 setpapertray b5envelope end
  279. X  516   729    13     8   503   721
  280. XEnvelope.567.903
  281. Xstatusdict begin 3 setpapertray folioenvelope end
  282. X  567   903    14     8   581   928
  283. XEnvelope.279.639
  284. Xstatusdict begin 3 setpapertray 3.875x8.875envelope end
  285. X  279   639    13    15   266   624
  286. XEnvelope.297.684
  287. Xstatusdict begin 3 setpapertray 4.125x9.5envelope end
  288. X  297   684    15    15   282   669
  289. XEnvelope.324.747
  290. Xstatusdict begin 3 setpapertray 4.5x10.375envelope end
  291. X  324   747    17    15   307   732
  292. XEnvelope.342.792
  293. Xstatusdict begin 3 setpapertray 4.75x11envelope end
  294. X  342   792    14    15   328   777
  295. XEnvelope.360.828
  296. Xstatusdict begin 3 setpapertray 5x11.5envelope end
  297. X  360   828    15    15   344   813
  298. XEnvelope.468.684
  299. Xstatusdict begin 3 setpapertray 6.5x9.5envelope end
  300. X  468   684    16    15   452   669
  301. XEnvelope.540.756
  302. Xstatusdict begin 3 setpapertray 7.5x10.5envelope end
  303. X  540   756    13    15   527   741
  304. XEnvelope.630.810
  305. Xstatusdict begin 3 setpapertray 8.75x11.25envelope end
  306. X  630   810    16    15   614   795
  307. XA4
  308. X
  309. X  595   842    14     8   581   834
  310. XA5
  311. X
  312. X  420   595    15     8   405   588
  313. XB5
  314. X
  315. X  516   729    13     8   503   721
  316. XFolio
  317. X
  318. X  567   903    14     8   581   928
  319. X*fonts
  320. XAvantGarde-Book
  321. XAvantGarde-Demi
  322. XBookman-Demi
  323. XBookman-Light
  324. XCourier
  325. XHelvetica
  326. XHelvetica-Narrow
  327. XNewCenturySchlbk-Roman
  328. XPalatino-Roman
  329. XSymbol
  330. XTimes-Roman
  331. XZapfChancery-MediumItalic
  332. XZapfDingbats
  333. X*slots
  334. Xstatusdict begin 0 setpapertray end
  335. Xstatusdict begin 1 setpapertray end
  336. Xstatusdict begin 2 setpapertray end
  337. Xstatusdict begin 3 setpapertray end
  338. X*eof
  339. END_OF_FILE
  340. if test 2343 -ne `wc -c <'defs/dp_us470.def'`; then
  341.     echo shar: \"'defs/dp_us470.def'\" unpacked with wrong size!
  342. fi
  343. # end of 'defs/dp_us470.def'
  344. fi
  345. if test -f 'defs/ibm20470.def' -a "${1}" != "-c" ; then 
  346.   echo shar: Will not clobber existing file \"'defs/ibm20470.def'\"
  347. else
  348. echo shar: Extracting \"'defs/ibm20470.def'\" \(2541 characters\)
  349. sed "s/^X//" >'defs/ibm20470.def' <<'END_OF_FILE'
  350. XIBM 4216-020 v47.0
  351. XLetter
  352. Xletter
  353. X  612   792    17    19   595   774
  354. XLegal
  355. Xlegal
  356. X  612  1008    17    19   595   990
  357. XA4
  358. Xa4
  359. X  595   842    18    19   577   823
  360. XA5
  361. Xa5
  362. X  420   595    18    19   401   577
  363. XB5
  364. Xb5
  365. X  516   729    18    19   481   690
  366. XStatement
  367. Xstatement
  368. X  396   612    18    19   378   594
  369. XEnvelope.612.792
  370. Xstatusdict begin /envelopewidth 612 def /envelopeheight 792 def envelope end
  371. X  612   792    15     8   597   784
  372. XEnvelope.612.1008
  373. Xstatusdict begin /envelopewidth 612 def /envelopeheight 1008 def envelope end
  374. X  612  1008    15    15   597   993
  375. XEnvelope.396.612
  376. Xstatusdict begin /envelopewidth 396 def /envelopeheight 612 def envelope end
  377. X  396   612    14     8   382   604
  378. XEnvelope.595.842
  379. Xstatusdict begin /envelopewidth 595 def /envelopeheight 842 def envelope end
  380. X  595   842    14     8   581   834
  381. XEnvelope.420.595
  382. Xstatusdict begin /envelopewidth 420 def /envelopeheight 595 def envelope end
  383. X  420   595    15     8   405   588
  384. XEnvelope.516.729
  385. Xstatusdict begin /envelopewidth 516 def /envelopeheight 729 def envelope end
  386. X  516   729    13     8   503   721
  387. XEnvelope.567.903
  388. Xstatusdict begin /envelopewidth 567 def /envelopeheight 903 def envelope end
  389. X  567   903    14     8   581   928
  390. XEnvelope.279.639
  391. Xstatusdict begin /envelopewidth 279 def /envelopeheight 639 def envelope end
  392. X  279   639    13    15   266   624
  393. XEnvelope.297.684
  394. Xstatusdict begin /envelopewidth 297 def /envelopeheight 684 def envelope end
  395. X  297   684    15    15   282   669
  396. XEnvelope.324.747
  397. Xstatusdict begin /envelopewidth 324 def /envelopeheight 747 def envelope end
  398. X  324   747    17    15   307   732
  399. XEnvelope.342.792
  400. Xstatusdict begin /envelopewidth 342 def /envelopeheight 792 def envelope end
  401. X  342   792    14    15   328   777
  402. XEnvelope.360.828
  403. Xstatusdict begin /envelopewidth 360 def /envelopeheight 828 def envelope end
  404. X  360   828    15    15   344   813
  405. XEnvelope.468.684
  406. Xstatusdict begin /envelopewidth 468 def /envelopeheight 684 def envelope end
  407. X  468   684    16    15   452   669
  408. XEnvelope.540.756
  409. Xstatusdict begin /envelopewidth 540 def /envelopeheight 756 def envelope end
  410. X  540   756    13    15   527   741
  411. XEnvelope.630.810
  412. Xstatusdict begin /envelopewidth 630 def /envelopeheight 810 def envelope end
  413. X  630   810    16    15   614   795
  414. X*fonts
  415. XAvantGarde-Book
  416. XAvantGarde-Demi
  417. XBookman-Demi
  418. XBookman-Light
  419. XCourier
  420. XEmulatorfont
  421. XGaramond-Light
  422. XHelvetica
  423. XHelvetica-Black
  424. XHelvetica-Light
  425. XKorinna-KursivRegular
  426. XKorinna-Regular
  427. XNewCenturySchlbk-Roman
  428. XPalatino-Roman
  429. XSymbol
  430. XTimes-Roman
  431. XZapfChancery-MediumItalic
  432. XZapfDingbats
  433. X*slots
  434. X*eof
  435. END_OF_FILE
  436. if test 2541 -ne `wc -c <'defs/ibm20470.def'`; then
  437.     echo shar: \"'defs/ibm20470.def'\" unpacked with wrong size!
  438. fi
  439. # end of 'defs/ibm20470.def'
  440. fi
  441. if test -f 'pmf.1' -a "${1}" != "-c" ; then 
  442.   echo shar: Will not clobber existing file \"'pmf.1'\"
  443. else
  444. echo shar: Extracting \"'pmf.1'\" \(1665 characters\)
  445. sed "s/^X//" >'pmf.1' <<'END_OF_FILE'
  446. X.TH PMF 1 ""
  447. X.SH NAME
  448. Xpmf \- postscript mail pre-filter
  449. X.SH SYNOPSIS
  450. X.nf
  451. X
  452. Xpmf [ -s ] file...  >out.file
  453. X
  454. X   where     -s = show all header lines
  455. X           file = input files (or stdin)
  456. X.fi
  457. X
  458. X.SH DESCRIPTION
  459. X
  460. X.B Pmf
  461. Xis a very simple filter for mail documents. It italicizes the
  462. X'Subject:' and attempts to place peoples names in boldface. It can be
  463. Xused to print entire mail boxes while suppressing unnecessary mail
  464. Xheaders.
  465. X
  466. XMail box message file may be printed with:
  467. X
  468. X.nf
  469. X      pmf mail.file | psf -2 | lp
  470. X.fi
  471. X
  472. XIf 
  473. X.B psf
  474. Xhas been installed as part of the print spooling system,
  475. Xthen the output from pmf may be passed directly to the 
  476. X.B lp
  477. Xspooler with:
  478. X
  479. X.nf
  480. X     pmf mail.file | lp
  481. X.fi
  482. X
  483. XIf multiple mailboxes are printed, it might be preferable to use the
  484. Xcommand (refer to the man pages for psmbox):
  485. X.nf
  486. X
  487. X      psmbox file file ...
  488. X.fi
  489. X
  490. XThis date-stamps and identifies the mail box name.  Each mailbox file
  491. Xis treated as a separate print job.  This may result in printer banner
  492. Xpages for each file.
  493. X
  494. XIf 
  495. X.B pmf
  496. Xand
  497. X.B psf
  498. Xare used with 
  499. X.B ELM
  500. Xthe user's elmrc file should be modified
  501. Xto specify the following "print" line (or reasonable approximation):
  502. X
  503. X.nf
  504. X      print = /usr/bin/pmf %s | /usr/bin/psf -2 | /usr/bin/lp
  505. X.fi
  506. X
  507. X.SH OPTIONS
  508. X
  509. X.TP .9i
  510. X.B \-s
  511. Xcauses all mail headers to be printed.  If this option is not
  512. Xspecified, then pmf will suppress "meaningless" headers such as:
  513. X
  514. X.nf
  515. X            Received:
  516. X            References:
  517. X            Path:
  518. X            Message-ID:
  519. X.fi
  520. X
  521. Xand other.  If additional headers are to be ignored, the source for
  522. Xpmf.c must be modified.
  523. X
  524. X.SH SEE ALSO
  525. Xpsf pnf psmbox psnroff psman
  526. X.fi
  527. X
  528. X.SH AUTHOR
  529. XTony Field.         tony@ajfcal
  530. END_OF_FILE
  531. if test 1665 -ne `wc -c <'pmf.1'`; then
  532.     echo shar: \"'pmf.1'\" unpacked with wrong size!
  533. fi
  534. # end of 'pmf.1'
  535. fi
  536. if test -f 'pmf.doc' -a "${1}" != "-c" ; then 
  537.   echo shar: Will not clobber existing file \"'pmf.doc'\"
  538. else
  539. echo shar: Extracting \"'pmf.doc'\" \(1797 characters\)
  540. sed "s/^X//" >'pmf.doc' <<'END_OF_FILE'
  541. X
  542. X
  543. X
  544. X     PMF(1)               UNIX System V            PMF(1)
  545. X
  546. X
  547. X
  548. X     NAME
  549. X      pmf -    postscript mail    pre-filter
  550. X
  551. X     SYNOPSIS
  552. X      pmf [    -s ] file...  >out.file
  553. X
  554. X         where     -s = show all header lines
  555. X             file = input files    (or stdin)
  556. X
  557. X
  558. X     DESCRIPTION
  559. X      Pmf is a very    simple filter for mail documents. It
  560. X      italicizes the used to print entire mail boxes while
  561. X      suppressing unnecessary mail headers.
  562. X
  563. X      Mail box message file    may be printed with:
  564. X
  565. X        pmf mail.file |    psf -2 | lp
  566. X
  567. X      If psf has been installed as part of the print spooling
  568. X      system, then the output from pmf may be passed directly to
  569. X      the lp spooler with:
  570. X
  571. X           pmf mail.file | lp
  572. X
  573. X      If multiple mailboxes    are printed, it    might be preferable to
  574. X      use the command (refer to the    man pages for psmbox):
  575. X
  576. X        psmbox file file ...
  577. X
  578. X      This date-stamps and identifies the mail box name.  Each
  579. X      mailbox file is treated as a separate    print job.  This may
  580. X      result in printer banner pages for each file.
  581. X
  582. X      If pmf and psf are used with ELM the user's elmrc file
  583. X      should be modified to    specify    the following "print" line (or
  584. X      reasonable approximation):
  585. X
  586. X        print =    /usr/bin/pmf %s    | /usr/bin/psf -2 | /usr/bin/lp
  587. X
  588. X
  589. X     OPTIONS
  590. X      -s       causes all mail headers to be printed.  If this
  591. X           option is not specified, then pmf will suppress
  592. X           "meaningless" headers such as:
  593. X
  594. X                   Received:
  595. X                   References:
  596. X                   Path:
  597. X                   Message-ID:
  598. X
  599. X           and other.  If additional headers are to be
  600. X
  601. X
  602. X
  603. X     Page 1                         (printed 5/14/90)
  604. X
  605. X
  606. X
  607. X
  608. X
  609. X
  610. X     PMF(1)               UNIX System V            PMF(1)
  611. X
  612. X
  613. X
  614. X           ignored, the    source for pmf.c must be modified.
  615. X
  616. X
  617. X     SEE ALSO
  618. X      psf pnf psmbox psnroff psman
  619. X
  620. X
  621. X     AUTHOR
  622. X      Tony Field.          tony@ajfcal
  623. X
  624. X
  625. X
  626. X
  627. X
  628. X
  629. X
  630. X
  631. X
  632. X
  633. X
  634. X
  635. X
  636. X
  637. X
  638. X
  639. X
  640. X
  641. X
  642. X
  643. X
  644. X
  645. X
  646. X
  647. X
  648. X
  649. X
  650. X
  651. X
  652. X
  653. X
  654. X
  655. X
  656. X
  657. X
  658. X
  659. X
  660. X
  661. X
  662. X
  663. X
  664. X
  665. X
  666. X
  667. X
  668. X
  669. X     Page 2                         (printed 5/14/90)
  670. X
  671. X
  672. X
  673. END_OF_FILE
  674. if test 1797 -ne `wc -c <'pmf.doc'`; then
  675.     echo shar: \"'pmf.doc'\" unpacked with wrong size!
  676. fi
  677. # end of 'pmf.doc'
  678. fi
  679. if test -f 'pnf.1' -a "${1}" != "-c" ; then 
  680.   echo shar: Will not clobber existing file \"'pnf.1'\"
  681. else
  682. echo shar: Extracting \"'pnf.1'\" \(3600 characters\)
  683. sed "s/^X//" >'pnf.1' <<'END_OF_FILE'
  684. X.TH PNF 1 ""
  685. X.SH NAME
  686. Xpnf \- postscript nroff pre-filter for use with psf
  687. X
  688. X.SH SYNOPSIS
  689. X.nf
  690. X
  691. Xpnf [ -i ] [ -f ] [ -l n ] [ -r n ] file...  >out.file
  692. X
  693. X   where     -i   = use italic font instead of underline
  694. X             -f   = document has formfeeds, ignore line count
  695. X             -l n = nroff generated "n" ine pages
  696. X                    (default = 66 lines)
  697. X             -r n = number of lines to remove (default = 3)
  698. X           file = input files (or stdin)
  699. X.fi
  700. X
  701. X.SH DESCRIPTION
  702. X
  703. X.B Pnf
  704. Xis a filter that converts "backspaced text" generated by 
  705. X.B nroff
  706. Xinto underlined or bold text. Nroff'ed documents should be filtered by 
  707. X.B pnf
  708. Xbefore they are passed to 
  709. X.B psf
  710. Xfor processing.  If 
  711. X.B troff
  712. Xsupport is unavailable, then
  713. X.B pnf/psf
  714. Xmay provide reasonable print quality on a PostScript printer.
  715. X
  716. XNroff'ed documents normally generate blank lines to separate pages (not
  717. Xform feeds).  Various nroff'ed document may have different page lengths.
  718. X
  719. XNroff'ed documents normally use 66 line pages.  Since
  720. X.B psf
  721. Xdefaults to 63 lines on Letter size paper (3 lines are unprintable), three
  722. Xblank lines are removed between nroff'ed pages.
  723. X
  724. XFor example, you could
  725. Xprint the "psf" man page "2-up" with:
  726. X
  727. X.nf
  728. X      nroff -man psf.1 | pnf -r 3 | psf -2 | lp
  729. X
  730. Xor 1-up with with italic conversion
  731. X
  732. X      nroff -man psf.1 | pnf -ir 3 | psf -2 | lp
  733. X.fi
  734. X
  735. XMultiple man pages may be conveniently printed directly from
  736. Xthe
  737. X.B man
  738. Xsystem with the script file "psman".
  739. XRefer to the man page for psman.
  740. X
  741. X.SH OPTIONS
  742. X
  743. X.TP .9i
  744. X.B \-i
  745. XSince the text from
  746. X.B nroff
  747. Xusually substitutes underlines for
  748. Xitalics, you may use the -i option to generate the "italic" instead of
  749. X"underline" escape sequence whenever an underline is detected in the
  750. Xinput text.  Italics character may be more pleasing than underlined
  751. Xtext.
  752. X
  753. X.RE
  754. X.TP .9i
  755. X.B \-f
  756. XIf the document uses form feeds for page separation, the -f option
  757. Xshould be specified.  Any line count specified by -l is ignored.
  758. X
  759. X.RE
  760. X.TP .9i
  761. X.B \-l n
  762. XThe -l option specifies the nominal number of lines generated by
  763. X.B nroff
  764. Xfor the page.  If the -l option is used, the -r option probably must
  765. Xbe specified also.
  766. X
  767. XIf "-l" is not specified, then 66 line nroff pages are assumed.
  768. X
  769. X.RE
  770. X.TP .9i
  771. X.B \-r n
  772. XThe -r option allows you to specify the number blank lines to be
  773. Xremoved between each page generated by nroff.
  774. XIf "-r" is not specified, then 3 blank lines are removed between pages.
  775. X
  776. XThe removed lines account for the "unprintable" top an bottom
  777. Xareas of the postscript page.
  778. X
  779. X.SH PNF NOTES
  780. X
  781. X.B Pnf
  782. Xconverts "backspaced text" generated by
  783. X.B nroff
  784. Xinto escape sequences
  785. Xthat can be used by psf to generate underlined or bold text. The algorithm
  786. Xused is quite simple: it simply scans for the "backspace" character and
  787. Xattempts determine if the backspace is used in the contex of an "underline"
  788. Xor "multi-strike boldface".  In some circumstances, it may not correctly
  789. Xdetect the print operation (for example, italic-bold is not recognized).
  790. X
  791. XThe conversion results in the following generated sequences that can
  792. Xbe recognized by
  793. X.B psf
  794. X(were ^E is <ctrl>E or the octal value \\005):
  795. X.nf
  796. X
  797. X        ^EB..text..^Eb   for bold
  798. X        ^EU..text..^Eu   for underline
  799. Xor
  800. X        ^EI..text..^Ei   for italics
  801. X
  802. X(italics instead of underline selected with -i option)
  803. X
  804. X.fi
  805. XThe logic cannot handle bold-underlined (nor italic-underlined).
  806. X
  807. XA shell script 
  808. X.B psman
  809. Xis provided to print man pages conveniently without the need of
  810. X.B nroff
  811. Xand friends.
  812. XThe man pages for psf could be printed with:
  813. X.nf
  814. X
  815. X    psman psf
  816. X
  817. X.fi
  818. X.SH SEE ALSO
  819. Xpsf pmf psman psnroff psmbox
  820. X
  821. X.SH AUTHOR
  822. X
  823. XTony Field.         tony@ajfcal
  824. END_OF_FILE
  825. if test 3600 -ne `wc -c <'pnf.1'`; then
  826.     echo shar: \"'pnf.1'\" unpacked with wrong size!
  827. fi
  828. # end of 'pnf.1'
  829. fi
  830. if test -f 'pnf.doc' -a "${1}" != "-c" ; then 
  831.   echo shar: Will not clobber existing file \"'pnf.doc'\"
  832. else
  833. echo shar: Extracting \"'pnf.doc'\" \(3970 characters\)
  834. sed "s/^X//" >'pnf.doc' <<'END_OF_FILE'
  835. X
  836. X
  837. X
  838. X     PNF(1)               UNIX System V            PNF(1)
  839. X
  840. X
  841. X
  842. X     NAME
  843. X      pnf -    postscript nroff pre-filter for    use with psf
  844. X
  845. X
  846. X     SYNOPSIS
  847. X      pnf [    -i ] [ -f ] [ -l n ] [ -r n ] file...  >out.file
  848. X
  849. X         where     -i   = use italic font instead of underline
  850. X               -f   = document has formfeeds, ignore line count
  851. X               -l n = nroff generated "n" ine pages
  852. X                  (default = 66 lines)
  853. X               -r n = number of    lines to remove    (default = 3)
  854. X             file = input files    (or stdin)
  855. X
  856. X
  857. X     DESCRIPTION
  858. X      Pnf is a filter that converts    "backspaced text" generated by
  859. X      nroff    into underlined    or bold    text. Nroff'ed documents
  860. X      should be filtered by    pnf before they    are passed to psf for
  861. X      processing.  If troff    support    is unavailable,    then pnf/psf
  862. X      may provide reasonable print quality on a PostScript
  863. X      printer.
  864. X
  865. X      Nroff'ed documents normally generate blank lines to separate
  866. X      pages    (not form feeds).  Various nroff'ed document may have
  867. X      different page lengths.
  868. X
  869. X      Nroff'ed documents normally use 66 line pages.  Since    psf
  870. X      defaults to 63 lines on Letter size paper (3 lines are
  871. X      unprintable),    three blank lines are removed between nroff'ed
  872. X      pages.
  873. X
  874. X      For example, you could print the "psf" man page "2-up" with:
  875. X
  876. X        nroff -man psf.1 | pnf -r 3 | psf -2 | lp
  877. X
  878. X      or 1-up with with italic conversion
  879. X
  880. X        nroff -man psf.1 | pnf -ir 3 | psf -2 |    lp
  881. X
  882. X      Multiple man pages may be conveniently printed directly from
  883. X      the man system with the script file "psman".    Refer to the
  884. X      man page for psman.
  885. X
  886. X
  887. X     OPTIONS
  888. X      -i       Since the text from nroff usually substitutes
  889. X           underlines for italics, you may use the -i option
  890. X           to generate the "italic" instead of "underline"
  891. X           escape sequence whenever an underline is detected
  892. X           in the input    text.  Italics character may be    more
  893. X           pleasing than underlined text.
  894. X
  895. X
  896. X
  897. X     Page 1                         (printed 5/15/90)
  898. X
  899. X
  900. X
  901. X
  902. X
  903. X
  904. X     PNF(1)               UNIX System V            PNF(1)
  905. X
  906. X
  907. X
  908. X      -f       If the document uses    form feeds for page
  909. X           separation, the -f option should be specified.  Any
  910. X           line    count specified    by -l is ignored.
  911. X
  912. X
  913. X      -l n       The -l option specifies the nominal number of lines
  914. X           generated by    nroff for the page.  If    the -l option
  915. X           is used, the    -r option probably must    be specified
  916. X           also.
  917. X
  918. X           If "-l" is not specified, then 66 line nroff    pages
  919. X           are assumed.
  920. X
  921. X
  922. X      -r n       The -r option allows    you to specify the number
  923. X           blank lines to be removed between each page
  924. X           generated by    nroff.    If "-r"    is not specified, then
  925. X           3 blank lines are removed between pages.
  926. X
  927. X           The removed lines account for the "unprintable" top
  928. X           an bottom areas of the postscript page.
  929. X
  930. X
  931. X     PNF NOTES
  932. X      Pnf converts "backspaced text" generated by nroff into
  933. X      escape sequences that    can be used by psf to generate
  934. X      underlined or    bold text. The algorithm used is quite simple:
  935. X      it simply scans for the "backspace" character    and attempts
  936. X      determine if the backspace is    used in    the contex of an
  937. X      "underline" or "multi-strike boldface".  In some
  938. X      circumstances, it may    not correctly detect the print
  939. X      operation (for example, italic-bold is not recognized).
  940. X
  941. X      The conversion results in the    following generated sequences
  942. X      that can be recognized by psf    (were ^E is <ctrl>E or the
  943. X      octal    value \005):
  944. X
  945. X          ^EB..text..^Eb   for bold
  946. X          ^EU..text..^Eu   for underline
  947. X      or
  948. X          ^EI..text..^Ei   for italics
  949. X
  950. X      (italics instead of underline    selected with -i option)
  951. X
  952. X      The logic cannot handle bold-underlined (nor italic-
  953. X      underlined).
  954. X
  955. X      A shell script psman is provided to print man    pages
  956. X      conveniently without the need    of nroff and friends.  The man
  957. X      pages    for psf    could be printed with:
  958. X
  959. X           psman psf
  960. X
  961. X
  962. X
  963. X     Page 2                         (printed 5/15/90)
  964. X
  965. X
  966. X
  967. X
  968. X
  969. X
  970. X     PNF(1)               UNIX System V            PNF(1)
  971. X
  972. X
  973. X
  974. X     SEE ALSO
  975. X      psf pmf psman    psnroff    psmbox
  976. X
  977. X
  978. X     AUTHOR
  979. X      Tony Field.          tony@ajfcal
  980. X
  981. X
  982. X
  983. X
  984. X
  985. X
  986. X
  987. X
  988. X
  989. X
  990. X
  991. X
  992. X
  993. X
  994. X
  995. X
  996. X
  997. X
  998. X
  999. X
  1000. X
  1001. X
  1002. X
  1003. X
  1004. X
  1005. X
  1006. X
  1007. X
  1008. X
  1009. X
  1010. X
  1011. X
  1012. X
  1013. X
  1014. X
  1015. X
  1016. X
  1017. X
  1018. X
  1019. X
  1020. X
  1021. X
  1022. X
  1023. X
  1024. X
  1025. X
  1026. X
  1027. X
  1028. X
  1029. X     Page 3                         (printed 5/15/90)
  1030. X
  1031. X
  1032. X
  1033. END_OF_FILE
  1034. if test 3970 -ne `wc -c <'pnf.doc'`; then
  1035.     echo shar: \"'pnf.doc'\" unpacked with wrong size!
  1036. fi
  1037. # end of 'pnf.doc'
  1038. fi
  1039. if test -f 'psd.1' -a "${1}" != "-c" ; then 
  1040.   echo shar: Will not clobber existing file \"'psd.1'\"
  1041. else
  1042. echo shar: Extracting \"'psd.1'\" \(2000 characters\)
  1043. sed "s/^X//" >'psd.1' <<'END_OF_FILE'
  1044. X.TH PSD 1 ""
  1045. X.SH NAME
  1046. Xpsd \- print double sided
  1047. X.SH SYNOPSIS
  1048. X.nf
  1049. X
  1050. Xpsd -n file
  1051. X
  1052. X    where   n  is the number 1, 2, or 3
  1053. X            1 = print first side
  1054. X            2 = print second side
  1055. X            3 = print both sides (must have second print tray)
  1056. X.fi
  1057. X
  1058. X.SH DESCRIPTION
  1059. X
  1060. XIf the postscript filter 
  1061. X.B psf
  1062. Xis used with the -d (double sided)
  1063. Xoption, the output from 
  1064. X.B psf
  1065. Xmust be passed to 
  1066. X.B psd
  1067. Xto print
  1068. Xthe generated file in "double sided" format.  (See NOTE below.)
  1069. X
  1070. XThe printing must be done in two passes:  first to print side one,
  1071. Xsecond to print side two.
  1072. X
  1073. XThe general sequence of commands must be:
  1074. X
  1075. X.nf
  1076. X        psf -d my.file > temp.file
  1077. X        psd -1 temp.file | lp
  1078. X                   <-- re-feed the paper for 2nd pass
  1079. X        psd -2 temp.file | lp
  1080. X.fi
  1081. X
  1082. XThe first invocation of 
  1083. X.B psd
  1084. Xwith the -1 option prints only the front side
  1085. Xof the pages.  After the printing is complete,  the paper must be
  1086. Xre-fed into the print hopper.  The psd -2 command is then issued to print
  1087. Xon the back side of the pages.
  1088. X
  1089. XIf 
  1090. X.B psd
  1091. Xis used with the -3 option, the front sides are printed.  Automatically,
  1092. Xthe printer is switched to accept input from the alternate print tray.
  1093. XAs soon as the alternate print tray is loaded, the second side is printed.
  1094. XE.g.:
  1095. X.nf
  1096. X        psf -d my.file > temp.file
  1097. X        psd -3 temp.file | lp
  1098. X.fi
  1099. X
  1100. XThe -3 option may be used only if the printer has two print trays.
  1101. X
  1102. X.SH NOTE
  1103. X
  1104. XIf 
  1105. X.B psf
  1106. Xwas compiled with the "-DHOPPER" option and the postscript printer
  1107. Xhas at least two paper hoppers, 
  1108. X.B psf
  1109. Xautomatically calls
  1110. X.B psd
  1111. Xto perform
  1112. Xdouble sided printing. Manual invocation of 
  1113. X.B psd
  1114. Xis not necessary.
  1115. X
  1116. XIf 
  1117. X.B psf
  1118. Xwas not compiled with "-DHOPPER" or if the postscript printer does
  1119. Xnot have at least two paper hoppers, then
  1120. X.B psd
  1121. Xmust be used as described
  1122. Xabove.
  1123. X
  1124. XThe use of option "-3" assumes that 
  1125. X.B psf
  1126. Xwas compiled 
  1127. X.B without
  1128. Xthe "-DHOPPER"
  1129. Xoption, however the printer does, in fact, have at least two paper
  1130. Xhoppers.
  1131. X
  1132. X.SH SEE ALSO
  1133. X
  1134. Xpsf psmbox pmf pnf psman psnroff
  1135. END_OF_FILE
  1136. if test 2000 -ne `wc -c <'psd.1'`; then
  1137.     echo shar: \"'psd.1'\" unpacked with wrong size!
  1138. fi
  1139. # end of 'psd.1'
  1140. fi
  1141. if test -f 'psd.doc' -a "${1}" != "-c" ; then 
  1142.   echo shar: Will not clobber existing file \"'psd.doc'\"
  1143. else
  1144. echo shar: Extracting \"'psd.doc'\" \(2200 characters\)
  1145. sed "s/^X//" >'psd.doc' <<'END_OF_FILE'
  1146. X
  1147. X
  1148. X
  1149. X     PSD(1)               UNIX System V            PSD(1)
  1150. X
  1151. X
  1152. X
  1153. X     NAME
  1154. X      psd -    print double sided
  1155. X
  1156. X     SYNOPSIS
  1157. X      psd -n file
  1158. X
  1159. X          where   n     is the    number 1, 2, or    3
  1160. X              1    = print    first side
  1161. X              2    = print    second side
  1162. X              3    = print    both sides (must have second print tray)
  1163. X
  1164. X
  1165. X     DESCRIPTION
  1166. X      If the postscript filter psf is used with the    -d (double
  1167. X      sided) option, the output from psf must be passed to psd to
  1168. X      print    the generated file in "double sided" format.  (See
  1169. X      NOTE below.)
  1170. X
  1171. X      The printing must be done in two passes:  first to print
  1172. X      side one, second to print side two.
  1173. X
  1174. X      The general sequence of commands must    be:
  1175. X
  1176. X          psf -d my.file > temp.file
  1177. X          psd -1 temp.file | lp
  1178. X                 <-- re-feed the paper for 2nd pass
  1179. X          psd -2 temp.file | lp
  1180. X
  1181. X      The first invocation of psd with the -1 option prints    only
  1182. X      the front side of the    pages.    After the printing is
  1183. X      complete,  the paper must be re-fed into the print hopper.
  1184. X      The psd -2 command is    then issued to print on    the back side
  1185. X      of the pages.
  1186. X
  1187. X      If psd is used with the -3 option, the front sides are
  1188. X      printed.  Automatically, the printer is switched to accept
  1189. X      input    from the alternate print tray.    As soon    as the
  1190. X      alternate print tray is loaded, the second side is printed.
  1191. X      E.g.:
  1192. X          psf -d my.file > temp.file
  1193. X          psd -3 temp.file | lp
  1194. X
  1195. X      The -3 option    may be used only if the    printer    has two    print
  1196. X      trays.
  1197. X
  1198. X
  1199. X     NOTE
  1200. X      If psf was compiled with the "-DHOPPER" option and the
  1201. X      postscript printer has at least two paper hoppers, psf
  1202. X      automatically    calls psd to perform double sided printing.
  1203. X      Manual invocation of psd is not necessary.
  1204. X
  1205. X
  1206. X
  1207. X
  1208. X     Page 1                         (printed 5/14/90)
  1209. X
  1210. X
  1211. X
  1212. X
  1213. X
  1214. X
  1215. X     PSD(1)               UNIX System V            PSD(1)
  1216. X
  1217. X
  1218. X
  1219. X      If psf was not compiled with "-DHOPPER" or if    the postscript
  1220. X      printer does not have    at least two paper hoppers, then psd
  1221. X      must be used as described above.
  1222. X
  1223. X      The use of option "-3" assumes that psf was compiled without
  1224. X      the "-DHOPPER" option, however the printer does, in fact,
  1225. X      have at least    two paper hoppers.
  1226. X
  1227. X
  1228. X     SEE ALSO
  1229. X      psf psmbox pmf pnf psman psnroff
  1230. X
  1231. X
  1232. X
  1233. X
  1234. X
  1235. X
  1236. X
  1237. X
  1238. X
  1239. X
  1240. X
  1241. X
  1242. X
  1243. X
  1244. X
  1245. X
  1246. X
  1247. X
  1248. X
  1249. X
  1250. X
  1251. X
  1252. X
  1253. X
  1254. X
  1255. X
  1256. X
  1257. X
  1258. X
  1259. X
  1260. X
  1261. X
  1262. X
  1263. X
  1264. X
  1265. X
  1266. X
  1267. X
  1268. X
  1269. X
  1270. X
  1271. X
  1272. X
  1273. X
  1274. X     Page 2                         (printed 5/14/90)
  1275. X
  1276. X
  1277. X
  1278. END_OF_FILE
  1279. if test 2200 -ne `wc -c <'psd.doc'`; then
  1280.     echo shar: \"'psd.doc'\" unpacked with wrong size!
  1281. fi
  1282. # end of 'psd.doc'
  1283. fi
  1284. if test -f 'psfsample.LP' -a "${1}" != "-c" ; then 
  1285.   echo shar: Will not clobber existing file \"'psfsample.LP'\"
  1286. else
  1287. echo shar: Extracting \"'psfsample.LP'\" \(2182 characters\)
  1288. sed "s/^X//" >'psfsample.LP' <<'END_OF_FILE'
  1289. X#  Postscript serial or parallel printer using psf filters
  1290. X#
  1291. X#    the call to "psbanner" and "psf" below should reflect the
  1292. X#    default paper size (given as   "-g Letter" in this example.)
  1293. X
  1294. X# where are the psf binaries?
  1295. X
  1296. XBINDIR="/usr/local/bin"
  1297. X
  1298. X# The following parameters are passed from "lp" at print time.
  1299. X
  1300. Xprinter=`basename $0`
  1301. Xrequest=$1
  1302. Xname=$2
  1303. Xtitle=$3
  1304. Xcopies=$4
  1305. Xoptions=$5
  1306. Xshift; shift; shift; shift; shift
  1307. X
  1308. X# Modify the following for required stty settings.
  1309. X
  1310. Xstty onlcr ixon ixoff 0<&1
  1311. X
  1312. X# get the banner count from what ever file tells you about banners.
  1313. X# see if the user is allowed to override the banner spec.
  1314. X# The "Banner: on" and "Banner: on:Always" can be specified by lpadmin.
  1315. X# The "Banner: off" must be manually edited into the configuration file.
  1316. X
  1317. Xbanner="yes"
  1318. Xbanopt=`sed -n 's/^Banner: *\(.*\).*$/\1/p' /usr/spool/lp/admins/lp/printers/$printer/configuration`
  1319. Xmustbanner="no"
  1320. Xfor i in ${banopt}
  1321. Xdo
  1322. X    case "${i}" in
  1323. X    
  1324. X    on)        banner="yes"
  1325. X            mustbanner="no"
  1326. X            ;;
  1327. X    on:Always)    banner="yes"
  1328. X            mustbanner="yes"
  1329. X            ;;
  1330. X    off)        banner="no"
  1331. X            mustbanner="no"
  1332. X            ;;
  1333. X    *)        banner="yes"
  1334. X            mustbanner="no"
  1335. X            ;;
  1336. X    esac
  1337. Xdone
  1338. X
  1339. Xoptions=
  1340. Xfor i in ${option_list}
  1341. Xdo
  1342. X    case "${i}" in
  1343. X
  1344. X    nobanner)
  1345. X        case "${mustbanner}" in
  1346. X        yes)    ;;
  1347. X        *)    banner="no"
  1348. X            ;;
  1349. X        esac
  1350. X        ;;
  1351. X    banner)
  1352. X        banner="yes"
  1353. X        ;;
  1354. X    *)
  1355. X        options="${options} ${i}"
  1356. X        ;;
  1357. X    esac;
  1358. Xdone
  1359. X
  1360. X
  1361. Xtoday=`date`
  1362. X
  1363. X[ "$banner" = yes ] && {
  1364. X
  1365. X    sysid=`uname -n`
  1366. X
  1367. X#    get the user name from the GCOS field in /etc/passwd
  1368. X
  1369. X    user=`sed -n "s/^$name:.*:.*:.*:\(.*\):.*:.*$/\1/p" /etc/passwd`
  1370. X
  1371. X    $BINDIR/psbanner "$name" "$user" "$request" "$printer" "$options" "$today" "$sysid" "$title" -g Letter
  1372. X}
  1373. X
  1374. X#    If the input text file contains %! in the first line,
  1375. X#    then assume that it has already been wrapped in postscript
  1376. X#    code.  If the %! is missing, then filter through psf
  1377. X#
  1378. X#    The "-g Letter" is the default paper size, however the user
  1379. X#    may override it with another specification
  1380. X#
  1381. X#    The "$options" are passed by lp with  -o"opions"
  1382. X
  1383. Xwhile    [ "$copies" -gt 0 ]
  1384. Xdo
  1385. X    for file
  1386. X    do
  1387. X        $BINDIR/psdetect < "$file"
  1388. X
  1389. X        case $? in
  1390. X
  1391. X        0)    cat "$file" 2>&1;;
  1392. X
  1393. X        1)    $BINDIR/psf -g Letter $options "$file" 2>&1;;
  1394. X
  1395. X        esac
  1396. X    done
  1397. X    copies=`expr $copies - 1`
  1398. Xdone
  1399. Xexit 0
  1400. END_OF_FILE
  1401. if test 2182 -ne `wc -c <'psfsample.LP'`; then
  1402.     echo shar: \"'psfsample.LP'\" unpacked with wrong size!
  1403. fi
  1404. # end of 'psfsample.LP'
  1405. fi
  1406. if test -f 'psfunix.LP' -a "${1}" != "-c" ; then 
  1407.   echo shar: Will not clobber existing file \"'psfunix.LP'\"
  1408. else
  1409. echo shar: Extracting \"'psfunix.LP'\" \(2338 characters\)
  1410. sed "s/^X//" >'psfunix.LP' <<'END_OF_FILE'
  1411. X#ident    "x(#)lp:model/postscript    1.3.1.2
  1412. X#  Postscript serial or parallel printer using psf filters
  1413. X#
  1414. X#    The Install.unix script will use sed to replace "BINARY" with
  1415. X#        the binary library directory name such as /local/bin.
  1416. X#        "OPTIONS" will be replaced by the desired default
  1417. X#        options - usually the page size (-g Letter) generated
  1418. X#        with Install.unix.
  1419. X
  1420. X# The following parameters are passed from "lp" at print time.
  1421. X
  1422. Xprinter=`basename $0`
  1423. Xrequest=$1
  1424. Xname=$2
  1425. Xtitle=$3
  1426. Xcopies=$4
  1427. Xoptions=$5
  1428. Xshift; shift; shift; shift; shift
  1429. X
  1430. X# Modify the following for required stty settings.
  1431. X
  1432. Xstty onlcr ixon ixoff 0<&1
  1433. X
  1434. X# get the banner option from the configuration file.
  1435. X# see if the user is allowed to override the banner spec.
  1436. X# The "Banner: on" and "Banner: on:Always" can be specified by lpadmin.
  1437. X# The "Banner: off" must be manually edited into the configuration file.
  1438. X
  1439. Xbanner="yes"
  1440. Xbanopt=`sed -n 's/^Banner: *\(.*\).*$/\1/p' /usr/spool/lp/admins/lp/printers/$printer/configuration`
  1441. Xmustbanner="no"
  1442. Xfor i in ${banopt}
  1443. Xdo
  1444. X    case "${i}" in
  1445. X    
  1446. X    on)        banner="yes"
  1447. X            mustbanner="no"
  1448. X            ;;
  1449. X    on:Always)    banner="yes"
  1450. X            mustbanner="yes"
  1451. X            ;;
  1452. X    off)        banner="no"
  1453. X            mustbanner="no"
  1454. X            ;;
  1455. X    *)        banner="yes"
  1456. X            mustbanner="no"
  1457. X            ;;
  1458. X    esac
  1459. Xdone
  1460. X
  1461. Xoptions=
  1462. Xfor i in ${option_list}
  1463. Xdo
  1464. X    case "${i}" in
  1465. X
  1466. X    nobanner)
  1467. X        case "${mustbanner}" in
  1468. X        yes)    ;;
  1469. X        *)    banner="no"
  1470. X            ;;
  1471. X        esac
  1472. X        ;;
  1473. X    banner)
  1474. X        banner="yes"
  1475. X        ;;
  1476. X    *)
  1477. X        options="${options} ${i}"
  1478. X        ;;
  1479. X    esac;
  1480. Xdone
  1481. X
  1482. X
  1483. Xtoday=`date`
  1484. X
  1485. X[ "$banner" = yes ] && {
  1486. X
  1487. X#    get the machine name uname.
  1488. X
  1489. X    sysid=`uname -n`
  1490. X
  1491. X#    get the user name from the GCOS field in /etc/passwd
  1492. X
  1493. X    user=`sed -n "s/^$name:.*:.*:.*:\(.*\):.*:.*$/\1/p" /etc/passwd`
  1494. X
  1495. X    BINARY/psbanner "$name" "$user" "$request" "$printer" "$options" "$today" "$sysid" "$title" BANNER
  1496. X}
  1497. X
  1498. X#    If the input text file contains %! in the first line,
  1499. X#    then assume that it has already been wrapped in postscript
  1500. X#    code.  If the %! is missing, then filter through psf
  1501. X#
  1502. X#    The "OPTIONS" are default options forced in during "Install.unix"
  1503. X#    Typically, this specifies the default paper size e.g.:
  1504. X#
  1505. X#            -g Letter
  1506. X#
  1507. X#    The "$options" are passed by lp with  -o"opions"
  1508. X
  1509. Xwhile    [ "$copies" -gt 0 ]
  1510. Xdo
  1511. X    for file
  1512. X    do
  1513. X        BINARY/psdetect < "$file"
  1514. X
  1515. X        case $? in
  1516. X
  1517. X        0)    cat "$file" 2>&1;;
  1518. X
  1519. X        1)    BINARY/psf OPTIONS $options "$file" 2>&1;;
  1520. X
  1521. X        esac
  1522. X    done
  1523. X    copies=`expr $copies - 1`
  1524. Xdone
  1525. Xexit 0
  1526. END_OF_FILE
  1527. if test 2338 -ne `wc -c <'psfunix.LP'`; then
  1528.     echo shar: \"'psfunix.LP'\" unpacked with wrong size!
  1529. fi
  1530. # end of 'psfunix.LP'
  1531. fi
  1532. if test -f 'psfxenix.LP' -a "${1}" != "-c" ; then 
  1533.   echo shar: Will not clobber existing file \"'psfxenix.LP'\"
  1534. else
  1535. echo shar: Extracting \"'psfxenix.LP'\" \(2058 characters\)
  1536. sed "s/^X//" >'psfxenix.LP' <<'END_OF_FILE'
  1537. X:
  1538. X#
  1539. X#!    Postscript serial or parallel printer using psf filters
  1540. X#
  1541. X#    NOTE: the above line is displayed on the "mkdev lp" printer
  1542. X#    ^^^^^ selection list.  If you create multiple printer models,
  1543. X#          edit the above to signify the options invoked with psf.
  1544. X#
  1545. X#    This print model works with Xenix 2.2.3, 2.3.2.  It is the printer
  1546. X#    back-end that is called by lp for physical printing.
  1547. X#
  1548. X#    The installpsf script will use sed to replace "BINARY" with
  1549. X#        the binary library directory name.
  1550. X#        "OPTIONS" will be replaced by the desired default
  1551. X#        options specified in the Makefile.
  1552. X
  1553. X# The following parameters are passed from "lp" at print time.
  1554. X
  1555. Xprinter=`basename $0`
  1556. Xrequest=$1
  1557. Xname=$2
  1558. Xtitle=$3
  1559. Xcopies=$4
  1560. Xoptions=$5
  1561. Xshift; shift; shift; shift; shift
  1562. X
  1563. X# Modify the following for required stty settings.
  1564. X
  1565. Xstty onlcr ixon ixoff 0<&1
  1566. X
  1567. Xbanner=yes
  1568. Xtoday=`date`
  1569. Xfor i in $options; do
  1570. X    case $i in
  1571. X    b)    banner=no ;;
  1572. X    esac
  1573. Xdone
  1574. X
  1575. X[ "$banner" = yes ] && {
  1576. X
  1577. X#    get the machine name
  1578. X
  1579. X    if test -r /etc/systemid; then
  1580. X        sysid=`sed 1q /etc/systemid`
  1581. X    else
  1582. X        sysid=`uname -n`
  1583. X    fi
  1584. X
  1585. X#    get the user name from the GCOS field in /etc/passwd
  1586. X
  1587. X    user=`sed -n "s/^$name:.*:.*:.*:\(.*\):.*:.*$/\1/p" /etc/passwd`
  1588. X
  1589. X#    get the count of the number of banner pages from /etc/default/lpd
  1590. X
  1591. X    bannercount=`sed -n 's/^BANNERS=//p' /etc/default/lpd`
  1592. X    [ "$bannercount" -ge 0 -a "$bannercount" -le 5 ] || bannercount=1
  1593. X    while    [ "$bannercount" -gt 0 ]
  1594. X    do
  1595. X        BINARY/psbanner "$name" "$user" "$request" "$printer" "$options" "$today" "$sysid" "$title" BANNER
  1596. X        bannercount=`expr $bannercount - 1`
  1597. X    done
  1598. X}
  1599. X
  1600. X#    If the input text file contains %! in the first line,
  1601. X#    then assume that it has already been wrapped in postscript
  1602. X#    code.  If the %! is missing, then filter through psf
  1603. X#
  1604. X#    The "OPTIONS" are default options forced in during "installpsf"
  1605. X#    The "$options" are passed by lp with  -o"opions"
  1606. X
  1607. Xwhile    [ "$copies" -gt 0 ]
  1608. Xdo
  1609. X    for file
  1610. X    do
  1611. X        BINARY/psdetect < "$file"
  1612. X
  1613. X        case $? in
  1614. X
  1615. X        0)    cat "$file" 2>&1;;
  1616. X
  1617. X        1)    BINARY/psf OPTIONS $options "$file" 2>&1;;
  1618. X
  1619. X        esac
  1620. X    done
  1621. X    copies=`expr $copies - 1`
  1622. Xdone
  1623. Xexit 0
  1624. END_OF_FILE
  1625. if test 2058 -ne `wc -c <'psfxenix.LP'`; then
  1626.     echo shar: \"'psfxenix.LP'\" unpacked with wrong size!
  1627. fi
  1628. # end of 'psfxenix.LP'
  1629. fi
  1630. if test -f 'sample.def' -a "${1}" != "-c" ; then 
  1631.   echo shar: Will not clobber existing file \"'sample.def'\"
  1632. else
  1633. echo shar: Extracting \"'sample.def'\" \(2373 characters\)
  1634. sed "s/^X//" >'sample.def' <<'END_OF_FILE'
  1635. XThis is a commented sample of a printer "def" file.
  1636. X
  1637. XThe contents are distilled from the Adobe .ppd files for each printer
  1638. Xtype. Since the .ppd files are do not necessarily describe each printer
  1639. Xaccurately, you should run the "psizes.ps" programme (generated by
  1640. X"selectdef") to the printer to determine the imageable area actually
  1641. Xrecorded in your printer roms.  You may then change your psfprint.def
  1642. Xcontrol file to identify the accurate imageable area.
  1643. X
  1644. XThe various sections of the file are separated by a line starting
  1645. Xwith "*".  The first section describes the page sizes known to
  1646. Xthe printer.
  1647. X
  1648. X
  1649. X
  1650. XNEC LC-890 v47.0 (modified)             <-- printer name for selectdef
  1651. XLetter                                  <-- user name (e.g.   psf -g Letter)
  1652. Xstatusdict begin lettertray end         <-- actual postscript to select size
  1653. X  612   792    18    15   599   776     <-- page dimensions
  1654. X   |     |      |     |    |     +- upper right y-coord (points)
  1655. X   |     |      |     |    +------- upper right x-coord
  1656. X   |     |      |     +------------ lower left y-coord
  1657. X   |     |      +------------------ lower left x-coord
  1658. X   |     +------------------------- total page height in points
  1659. X   +------------------------------- total page width in points
  1660. X
  1661. XLegal                                   <-+-- the above is repeated for
  1662. Xstatusdict begin legaltray end            |   each page size known
  1663. X  612  1008    18    19   593   990     <-+-- to the printer
  1664. XA4
  1665. Xstatusdict begin a4tray end
  1666. X  595   842    10     8   585   813
  1667. XB5
  1668. Xstatusdict begin b5tray end
  1669. X  516   729    18     7   482   702
  1670. X*fonts                                  <-- marker for fonts
  1671. XAvantGarde-Book                         <-- real font names in font dictionary
  1672. XAvantGarde-Demi                             ( these font names are shown
  1673. XBookman-Demi                                  to the user on the psf
  1674. XBookman-Light                                 usage  with:   psf -? )
  1675. XCourier                                          
  1676. XHelvetica
  1677. XHelvetica-Narrow
  1678. XNewCenturySchlbk-Roman
  1679. XPalatino-Roman
  1680. XSymbol
  1681. XTimes-Roman
  1682. XZapfChancery-MediumItalic
  1683. XZapfDingbats
  1684. X*slots                                  <-- marker for paper trays
  1685. Xstatusdict begin 1 setpapertray end     <-- how to select first tray
  1686. Xstatusdict begin 2 setpapertray end     <-- how to select second tray  etc..
  1687. X*eof                                    <-- logical eof
  1688. END_OF_FILE
  1689. if test 2373 -ne `wc -c <'sample.def'`; then
  1690.     echo shar: \"'sample.def'\" unpacked with wrong size!
  1691. fi
  1692. # end of 'sample.def'
  1693. fi
  1694. echo shar: End of archive 2 \(of 6\).
  1695. cp /dev/null ark2isdone
  1696. MISSING=""
  1697. for I in 1 2 3 4 5 6 ; do
  1698.     if test ! -f ark${I}isdone ; then
  1699.     MISSING="${MISSING} ${I}"
  1700.     fi
  1701. done
  1702. if test "${MISSING}" = "" ; then
  1703.     echo You have unpacked all 6 archives.
  1704.     rm -f ark[1-9]isdone
  1705. else
  1706.     echo You still need to unpack the following archives:
  1707.     echo "        " ${MISSING}
  1708. fi
  1709. ##  End of shell archive.
  1710. exit 0
  1711.  
  1712.